gcp.compute.SecurityPolicy
Explore with Pulumi AI
A Security Policy defines an IP blacklist or whitelist that protects load balanced Google Cloud services by denying or permitting traffic from specified IP ranges. For more information see the official documentation and the API.
Security Policy is used by google_compute_backend_service.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const policy = new gcp.compute.SecurityPolicy("policy", {
name: "my-policy",
rules: [
{
action: "deny(403)",
priority: 1000,
match: {
versionedExpr: "SRC_IPS_V1",
config: {
srcIpRanges: ["9.9.9.0/24"],
},
},
description: "Deny access to IPs in 9.9.9.0/24",
},
{
action: "allow",
priority: 2147483647,
match: {
versionedExpr: "SRC_IPS_V1",
config: {
srcIpRanges: ["*"],
},
},
description: "default rule",
},
],
});
import pulumi
import pulumi_gcp as gcp
policy = gcp.compute.SecurityPolicy("policy",
name="my-policy",
rules=[
{
"action": "deny(403)",
"priority": 1000,
"match": {
"versioned_expr": "SRC_IPS_V1",
"config": {
"src_ip_ranges": ["9.9.9.0/24"],
},
},
"description": "Deny access to IPs in 9.9.9.0/24",
},
{
"action": "allow",
"priority": 2147483647,
"match": {
"versioned_expr": "SRC_IPS_V1",
"config": {
"src_ip_ranges": ["*"],
},
},
"description": "default rule",
},
])
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewSecurityPolicy(ctx, "policy", &compute.SecurityPolicyArgs{
Name: pulumi.String("my-policy"),
Rules: compute.SecurityPolicyRuleTypeArray{
&compute.SecurityPolicyRuleTypeArgs{
Action: pulumi.String("deny(403)"),
Priority: pulumi.Int(1000),
Match: &compute.SecurityPolicyRuleMatchArgs{
VersionedExpr: pulumi.String("SRC_IPS_V1"),
Config: &compute.SecurityPolicyRuleMatchConfigArgs{
SrcIpRanges: pulumi.StringArray{
pulumi.String("9.9.9.0/24"),
},
},
},
Description: pulumi.String("Deny access to IPs in 9.9.9.0/24"),
},
&compute.SecurityPolicyRuleTypeArgs{
Action: pulumi.String("allow"),
Priority: pulumi.Int(2147483647),
Match: &compute.SecurityPolicyRuleMatchArgs{
VersionedExpr: pulumi.String("SRC_IPS_V1"),
Config: &compute.SecurityPolicyRuleMatchConfigArgs{
SrcIpRanges: pulumi.StringArray{
pulumi.String("*"),
},
},
},
Description: pulumi.String("default rule"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var policy = new Gcp.Compute.SecurityPolicy("policy", new()
{
Name = "my-policy",
Rules = new[]
{
new Gcp.Compute.Inputs.SecurityPolicyRuleArgs
{
Action = "deny(403)",
Priority = 1000,
Match = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchArgs
{
VersionedExpr = "SRC_IPS_V1",
Config = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchConfigArgs
{
SrcIpRanges = new[]
{
"9.9.9.0/24",
},
},
},
Description = "Deny access to IPs in 9.9.9.0/24",
},
new Gcp.Compute.Inputs.SecurityPolicyRuleArgs
{
Action = "allow",
Priority = 2147483647,
Match = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchArgs
{
VersionedExpr = "SRC_IPS_V1",
Config = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchConfigArgs
{
SrcIpRanges = new[]
{
"*",
},
},
},
Description = "default rule",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.SecurityPolicy;
import com.pulumi.gcp.compute.SecurityPolicyArgs;
import com.pulumi.gcp.compute.inputs.SecurityPolicyRuleArgs;
import com.pulumi.gcp.compute.inputs.SecurityPolicyRuleMatchArgs;
import com.pulumi.gcp.compute.inputs.SecurityPolicyRuleMatchConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var policy = new SecurityPolicy("policy", SecurityPolicyArgs.builder()
.name("my-policy")
.rules(
SecurityPolicyRuleArgs.builder()
.action("deny(403)")
.priority("1000")
.match(SecurityPolicyRuleMatchArgs.builder()
.versionedExpr("SRC_IPS_V1")
.config(SecurityPolicyRuleMatchConfigArgs.builder()
.srcIpRanges("9.9.9.0/24")
.build())
.build())
.description("Deny access to IPs in 9.9.9.0/24")
.build(),
SecurityPolicyRuleArgs.builder()
.action("allow")
.priority("2147483647")
.match(SecurityPolicyRuleMatchArgs.builder()
.versionedExpr("SRC_IPS_V1")
.config(SecurityPolicyRuleMatchConfigArgs.builder()
.srcIpRanges("*")
.build())
.build())
.description("default rule")
.build())
.build());
}
}
resources:
policy:
type: gcp:compute:SecurityPolicy
properties:
name: my-policy
rules:
- action: deny(403)
priority: '1000'
match:
versionedExpr: SRC_IPS_V1
config:
srcIpRanges:
- 9.9.9.0/24
description: Deny access to IPs in 9.9.9.0/24
- action: allow
priority: '2147483647'
match:
versionedExpr: SRC_IPS_V1
config:
srcIpRanges:
- '*'
description: default rule
With ReCAPTCHA Configuration Options
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const primary = new gcp.recaptcha.EnterpriseKey("primary", {
displayName: "display-name",
labels: {
"label-one": "value-one",
},
project: "my-project-name",
webSettings: {
integrationType: "INVISIBLE",
allowAllDomains: true,
allowedDomains: ["localhost"],
},
});
const policy = new gcp.compute.SecurityPolicy("policy", {
name: "my-policy",
description: "basic security policy",
type: "CLOUD_ARMOR",
recaptchaOptionsConfig: {
redirectSiteKey: primary.name,
},
});
import pulumi
import pulumi_gcp as gcp
primary = gcp.recaptcha.EnterpriseKey("primary",
display_name="display-name",
labels={
"label-one": "value-one",
},
project="my-project-name",
web_settings={
"integration_type": "INVISIBLE",
"allow_all_domains": True,
"allowed_domains": ["localhost"],
})
policy = gcp.compute.SecurityPolicy("policy",
name="my-policy",
description="basic security policy",
type="CLOUD_ARMOR",
recaptcha_options_config={
"redirect_site_key": primary.name,
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/recaptcha"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
primary, err := recaptcha.NewEnterpriseKey(ctx, "primary", &recaptcha.EnterpriseKeyArgs{
DisplayName: pulumi.String("display-name"),
Labels: pulumi.StringMap{
"label-one": pulumi.String("value-one"),
},
Project: pulumi.String("my-project-name"),
WebSettings: &recaptcha.EnterpriseKeyWebSettingsArgs{
IntegrationType: pulumi.String("INVISIBLE"),
AllowAllDomains: pulumi.Bool(true),
AllowedDomains: pulumi.StringArray{
pulumi.String("localhost"),
},
},
})
if err != nil {
return err
}
_, err = compute.NewSecurityPolicy(ctx, "policy", &compute.SecurityPolicyArgs{
Name: pulumi.String("my-policy"),
Description: pulumi.String("basic security policy"),
Type: pulumi.String("CLOUD_ARMOR"),
RecaptchaOptionsConfig: &compute.SecurityPolicyRecaptchaOptionsConfigArgs{
RedirectSiteKey: primary.Name,
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var primary = new Gcp.Recaptcha.EnterpriseKey("primary", new()
{
DisplayName = "display-name",
Labels =
{
{ "label-one", "value-one" },
},
Project = "my-project-name",
WebSettings = new Gcp.Recaptcha.Inputs.EnterpriseKeyWebSettingsArgs
{
IntegrationType = "INVISIBLE",
AllowAllDomains = true,
AllowedDomains = new[]
{
"localhost",
},
},
});
var policy = new Gcp.Compute.SecurityPolicy("policy", new()
{
Name = "my-policy",
Description = "basic security policy",
Type = "CLOUD_ARMOR",
RecaptchaOptionsConfig = new Gcp.Compute.Inputs.SecurityPolicyRecaptchaOptionsConfigArgs
{
RedirectSiteKey = primary.Name,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.recaptcha.EnterpriseKey;
import com.pulumi.gcp.recaptcha.EnterpriseKeyArgs;
import com.pulumi.gcp.recaptcha.inputs.EnterpriseKeyWebSettingsArgs;
import com.pulumi.gcp.compute.SecurityPolicy;
import com.pulumi.gcp.compute.SecurityPolicyArgs;
import com.pulumi.gcp.compute.inputs.SecurityPolicyRecaptchaOptionsConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var primary = new EnterpriseKey("primary", EnterpriseKeyArgs.builder()
.displayName("display-name")
.labels(Map.of("label-one", "value-one"))
.project("my-project-name")
.webSettings(EnterpriseKeyWebSettingsArgs.builder()
.integrationType("INVISIBLE")
.allowAllDomains(true)
.allowedDomains("localhost")
.build())
.build());
var policy = new SecurityPolicy("policy", SecurityPolicyArgs.builder()
.name("my-policy")
.description("basic security policy")
.type("CLOUD_ARMOR")
.recaptchaOptionsConfig(SecurityPolicyRecaptchaOptionsConfigArgs.builder()
.redirectSiteKey(primary.name())
.build())
.build());
}
}
resources:
primary:
type: gcp:recaptcha:EnterpriseKey
properties:
displayName: display-name
labels:
label-one: value-one
project: my-project-name
webSettings:
integrationType: INVISIBLE
allowAllDomains: true
allowedDomains:
- localhost
policy:
type: gcp:compute:SecurityPolicy
properties:
name: my-policy
description: basic security policy
type: CLOUD_ARMOR
recaptchaOptionsConfig:
redirectSiteKey: ${primary.name}
With Header Actions
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const policy = new gcp.compute.SecurityPolicy("policy", {
name: "my-policy",
rules: [
{
action: "allow",
priority: 2147483647,
match: {
versionedExpr: "SRC_IPS_V1",
config: {
srcIpRanges: ["*"],
},
},
description: "default rule",
},
{
action: "allow",
priority: 1000,
match: {
expr: {
expression: "request.path.matches(\"/login.html\") && token.recaptcha_session.score < 0.2",
},
},
headerAction: {
requestHeadersToAdds: [
{
headerName: "reCAPTCHA-Warning",
headerValue: "high",
},
{
headerName: "X-Resource",
headerValue: "test",
},
],
},
},
],
});
import pulumi
import pulumi_gcp as gcp
policy = gcp.compute.SecurityPolicy("policy",
name="my-policy",
rules=[
{
"action": "allow",
"priority": 2147483647,
"match": {
"versioned_expr": "SRC_IPS_V1",
"config": {
"src_ip_ranges": ["*"],
},
},
"description": "default rule",
},
{
"action": "allow",
"priority": 1000,
"match": {
"expr": {
"expression": "request.path.matches(\"/login.html\") && token.recaptcha_session.score < 0.2",
},
},
"header_action": {
"request_headers_to_adds": [
{
"header_name": "reCAPTCHA-Warning",
"header_value": "high",
},
{
"header_name": "X-Resource",
"header_value": "test",
},
],
},
},
])
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewSecurityPolicy(ctx, "policy", &compute.SecurityPolicyArgs{
Name: pulumi.String("my-policy"),
Rules: compute.SecurityPolicyRuleTypeArray{
&compute.SecurityPolicyRuleTypeArgs{
Action: pulumi.String("allow"),
Priority: pulumi.Int(2147483647),
Match: &compute.SecurityPolicyRuleMatchArgs{
VersionedExpr: pulumi.String("SRC_IPS_V1"),
Config: &compute.SecurityPolicyRuleMatchConfigArgs{
SrcIpRanges: pulumi.StringArray{
pulumi.String("*"),
},
},
},
Description: pulumi.String("default rule"),
},
&compute.SecurityPolicyRuleTypeArgs{
Action: pulumi.String("allow"),
Priority: pulumi.Int(1000),
Match: &compute.SecurityPolicyRuleMatchArgs{
Expr: &compute.SecurityPolicyRuleMatchExprArgs{
Expression: pulumi.String("request.path.matches(\"/login.html\") && token.recaptcha_session.score < 0.2"),
},
},
HeaderAction: &compute.SecurityPolicyRuleHeaderActionArgs{
RequestHeadersToAdds: compute.SecurityPolicyRuleHeaderActionRequestHeadersToAddArray{
&compute.SecurityPolicyRuleHeaderActionRequestHeadersToAddArgs{
HeaderName: pulumi.String("reCAPTCHA-Warning"),
HeaderValue: pulumi.String("high"),
},
&compute.SecurityPolicyRuleHeaderActionRequestHeadersToAddArgs{
HeaderName: pulumi.String("X-Resource"),
HeaderValue: pulumi.String("test"),
},
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var policy = new Gcp.Compute.SecurityPolicy("policy", new()
{
Name = "my-policy",
Rules = new[]
{
new Gcp.Compute.Inputs.SecurityPolicyRuleArgs
{
Action = "allow",
Priority = 2147483647,
Match = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchArgs
{
VersionedExpr = "SRC_IPS_V1",
Config = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchConfigArgs
{
SrcIpRanges = new[]
{
"*",
},
},
},
Description = "default rule",
},
new Gcp.Compute.Inputs.SecurityPolicyRuleArgs
{
Action = "allow",
Priority = 1000,
Match = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchArgs
{
Expr = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchExprArgs
{
Expression = "request.path.matches(\"/login.html\") && token.recaptcha_session.score < 0.2",
},
},
HeaderAction = new Gcp.Compute.Inputs.SecurityPolicyRuleHeaderActionArgs
{
RequestHeadersToAdds = new[]
{
new Gcp.Compute.Inputs.SecurityPolicyRuleHeaderActionRequestHeadersToAddArgs
{
HeaderName = "reCAPTCHA-Warning",
HeaderValue = "high",
},
new Gcp.Compute.Inputs.SecurityPolicyRuleHeaderActionRequestHeadersToAddArgs
{
HeaderName = "X-Resource",
HeaderValue = "test",
},
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.SecurityPolicy;
import com.pulumi.gcp.compute.SecurityPolicyArgs;
import com.pulumi.gcp.compute.inputs.SecurityPolicyRuleArgs;
import com.pulumi.gcp.compute.inputs.SecurityPolicyRuleMatchArgs;
import com.pulumi.gcp.compute.inputs.SecurityPolicyRuleMatchConfigArgs;
import com.pulumi.gcp.compute.inputs.SecurityPolicyRuleMatchExprArgs;
import com.pulumi.gcp.compute.inputs.SecurityPolicyRuleHeaderActionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var policy = new SecurityPolicy("policy", SecurityPolicyArgs.builder()
.name("my-policy")
.rules(
SecurityPolicyRuleArgs.builder()
.action("allow")
.priority("2147483647")
.match(SecurityPolicyRuleMatchArgs.builder()
.versionedExpr("SRC_IPS_V1")
.config(SecurityPolicyRuleMatchConfigArgs.builder()
.srcIpRanges("*")
.build())
.build())
.description("default rule")
.build(),
SecurityPolicyRuleArgs.builder()
.action("allow")
.priority("1000")
.match(SecurityPolicyRuleMatchArgs.builder()
.expr(SecurityPolicyRuleMatchExprArgs.builder()
.expression("request.path.matches(\"/login.html\") && token.recaptcha_session.score < 0.2")
.build())
.build())
.headerAction(SecurityPolicyRuleHeaderActionArgs.builder()
.requestHeadersToAdds(
SecurityPolicyRuleHeaderActionRequestHeadersToAddArgs.builder()
.headerName("reCAPTCHA-Warning")
.headerValue("high")
.build(),
SecurityPolicyRuleHeaderActionRequestHeadersToAddArgs.builder()
.headerName("X-Resource")
.headerValue("test")
.build())
.build())
.build())
.build());
}
}
resources:
policy:
type: gcp:compute:SecurityPolicy
properties:
name: my-policy
rules:
- action: allow
priority: '2147483647'
match:
versionedExpr: SRC_IPS_V1
config:
srcIpRanges:
- '*'
description: default rule
- action: allow
priority: '1000'
match:
expr:
expression: request.path.matches("/login.html") && token.recaptcha_session.score < 0.2
headerAction:
requestHeadersToAdds:
- headerName: reCAPTCHA-Warning
headerValue: high
- headerName: X-Resource
headerValue: test
With EnforceOnKey Value As Empty String
A scenario example that won’t cause any conflict between enforce_on_key
and enforce_on_key_configs
, because enforce_on_key
was specified as an empty string:
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const policy = new gcp.compute.SecurityPolicy("policy", {
name: "%s",
description: "throttle rule with enforce_on_key_configs",
rules: [{
action: "throttle",
priority: 2147483647,
match: {
versionedExpr: "SRC_IPS_V1",
config: {
srcIpRanges: ["*"],
},
},
description: "default rule",
rateLimitOptions: {
conformAction: "allow",
exceedAction: "redirect",
enforceOnKey: "",
enforceOnKeyConfigs: [{
enforceOnKeyType: "IP",
}],
exceedRedirectOptions: {
type: "EXTERNAL_302",
target: "<https://www.example.com>",
},
rateLimitThreshold: {
count: 10,
intervalSec: 60,
},
},
}],
});
import pulumi
import pulumi_gcp as gcp
policy = gcp.compute.SecurityPolicy("policy",
name="%s",
description="throttle rule with enforce_on_key_configs",
rules=[{
"action": "throttle",
"priority": 2147483647,
"match": {
"versioned_expr": "SRC_IPS_V1",
"config": {
"src_ip_ranges": ["*"],
},
},
"description": "default rule",
"rate_limit_options": {
"conform_action": "allow",
"exceed_action": "redirect",
"enforce_on_key": "",
"enforce_on_key_configs": [{
"enforce_on_key_type": "IP",
}],
"exceed_redirect_options": {
"type": "EXTERNAL_302",
"target": "<https://www.example.com>",
},
"rate_limit_threshold": {
"count": 10,
"interval_sec": 60,
},
},
}])
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewSecurityPolicy(ctx, "policy", &compute.SecurityPolicyArgs{
Name: pulumi.String("%s"),
Description: pulumi.String("throttle rule with enforce_on_key_configs"),
Rules: compute.SecurityPolicyRuleTypeArray{
&compute.SecurityPolicyRuleTypeArgs{
Action: pulumi.String("throttle"),
Priority: pulumi.Int(2147483647),
Match: &compute.SecurityPolicyRuleMatchArgs{
VersionedExpr: pulumi.String("SRC_IPS_V1"),
Config: &compute.SecurityPolicyRuleMatchConfigArgs{
SrcIpRanges: pulumi.StringArray{
pulumi.String("*"),
},
},
},
Description: pulumi.String("default rule"),
RateLimitOptions: &compute.SecurityPolicyRuleRateLimitOptionsArgs{
ConformAction: pulumi.String("allow"),
ExceedAction: pulumi.String("redirect"),
EnforceOnKey: pulumi.String(""),
EnforceOnKeyConfigs: compute.SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfigArray{
&compute.SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfigArgs{
EnforceOnKeyType: pulumi.String("IP"),
},
},
ExceedRedirectOptions: &compute.SecurityPolicyRuleRateLimitOptionsExceedRedirectOptionsArgs{
Type: pulumi.String("EXTERNAL_302"),
Target: pulumi.String("<https://www.example.com>"),
},
RateLimitThreshold: &compute.SecurityPolicyRuleRateLimitOptionsRateLimitThresholdArgs{
Count: pulumi.Int(10),
IntervalSec: pulumi.Int(60),
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var policy = new Gcp.Compute.SecurityPolicy("policy", new()
{
Name = "%s",
Description = "throttle rule with enforce_on_key_configs",
Rules = new[]
{
new Gcp.Compute.Inputs.SecurityPolicyRuleArgs
{
Action = "throttle",
Priority = 2147483647,
Match = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchArgs
{
VersionedExpr = "SRC_IPS_V1",
Config = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchConfigArgs
{
SrcIpRanges = new[]
{
"*",
},
},
},
Description = "default rule",
RateLimitOptions = new Gcp.Compute.Inputs.SecurityPolicyRuleRateLimitOptionsArgs
{
ConformAction = "allow",
ExceedAction = "redirect",
EnforceOnKey = "",
EnforceOnKeyConfigs = new[]
{
new Gcp.Compute.Inputs.SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfigArgs
{
EnforceOnKeyType = "IP",
},
},
ExceedRedirectOptions = new Gcp.Compute.Inputs.SecurityPolicyRuleRateLimitOptionsExceedRedirectOptionsArgs
{
Type = "EXTERNAL_302",
Target = "<https://www.example.com>",
},
RateLimitThreshold = new Gcp.Compute.Inputs.SecurityPolicyRuleRateLimitOptionsRateLimitThresholdArgs
{
Count = 10,
IntervalSec = 60,
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.SecurityPolicy;
import com.pulumi.gcp.compute.SecurityPolicyArgs;
import com.pulumi.gcp.compute.inputs.SecurityPolicyRuleArgs;
import com.pulumi.gcp.compute.inputs.SecurityPolicyRuleMatchArgs;
import com.pulumi.gcp.compute.inputs.SecurityPolicyRuleMatchConfigArgs;
import com.pulumi.gcp.compute.inputs.SecurityPolicyRuleRateLimitOptionsArgs;
import com.pulumi.gcp.compute.inputs.SecurityPolicyRuleRateLimitOptionsExceedRedirectOptionsArgs;
import com.pulumi.gcp.compute.inputs.SecurityPolicyRuleRateLimitOptionsRateLimitThresholdArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var policy = new SecurityPolicy("policy", SecurityPolicyArgs.builder()
.name("%s")
.description("throttle rule with enforce_on_key_configs")
.rules(SecurityPolicyRuleArgs.builder()
.action("throttle")
.priority("2147483647")
.match(SecurityPolicyRuleMatchArgs.builder()
.versionedExpr("SRC_IPS_V1")
.config(SecurityPolicyRuleMatchConfigArgs.builder()
.srcIpRanges("*")
.build())
.build())
.description("default rule")
.rateLimitOptions(SecurityPolicyRuleRateLimitOptionsArgs.builder()
.conformAction("allow")
.exceedAction("redirect")
.enforceOnKey("")
.enforceOnKeyConfigs(SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfigArgs.builder()
.enforceOnKeyType("IP")
.build())
.exceedRedirectOptions(SecurityPolicyRuleRateLimitOptionsExceedRedirectOptionsArgs.builder()
.type("EXTERNAL_302")
.target("<https://www.example.com>")
.build())
.rateLimitThreshold(SecurityPolicyRuleRateLimitOptionsRateLimitThresholdArgs.builder()
.count(10)
.intervalSec(60)
.build())
.build())
.build())
.build());
}
}
resources:
policy:
type: gcp:compute:SecurityPolicy
properties:
name: '%s'
description: throttle rule with enforce_on_key_configs
rules:
- action: throttle
priority: '2147483647'
match:
versionedExpr: SRC_IPS_V1
config:
srcIpRanges:
- '*'
description: default rule
rateLimitOptions:
conformAction: allow
exceedAction: redirect
enforceOnKey:
enforceOnKeyConfigs:
- enforceOnKeyType: IP
exceedRedirectOptions:
type: EXTERNAL_302
target: <https://www.example.com>
rateLimitThreshold:
count: 10
intervalSec: 60
Create SecurityPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SecurityPolicy(name: string, args?: SecurityPolicyArgs, opts?: CustomResourceOptions);
@overload
def SecurityPolicy(resource_name: str,
args: Optional[SecurityPolicyArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def SecurityPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
adaptive_protection_config: Optional[SecurityPolicyAdaptiveProtectionConfigArgs] = None,
advanced_options_config: Optional[SecurityPolicyAdvancedOptionsConfigArgs] = None,
description: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
recaptcha_options_config: Optional[SecurityPolicyRecaptchaOptionsConfigArgs] = None,
rules: Optional[Sequence[SecurityPolicyRuleArgs]] = None,
type: Optional[str] = None)
func NewSecurityPolicy(ctx *Context, name string, args *SecurityPolicyArgs, opts ...ResourceOption) (*SecurityPolicy, error)
public SecurityPolicy(string name, SecurityPolicyArgs? args = null, CustomResourceOptions? opts = null)
public SecurityPolicy(String name, SecurityPolicyArgs args)
public SecurityPolicy(String name, SecurityPolicyArgs args, CustomResourceOptions options)
type: gcp:compute:SecurityPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args SecurityPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args SecurityPolicyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SecurityPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecurityPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SecurityPolicyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var securityPolicyResource = new Gcp.Compute.SecurityPolicy("securityPolicyResource", new()
{
AdaptiveProtectionConfig = new Gcp.Compute.Inputs.SecurityPolicyAdaptiveProtectionConfigArgs
{
AutoDeployConfig = new Gcp.Compute.Inputs.SecurityPolicyAdaptiveProtectionConfigAutoDeployConfigArgs
{
ConfidenceThreshold = 0,
ExpirationSec = 0,
ImpactedBaselineThreshold = 0,
LoadThreshold = 0,
},
Layer7DdosDefenseConfig = new Gcp.Compute.Inputs.SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigArgs
{
Enable = false,
RuleVisibility = "string",
},
},
AdvancedOptionsConfig = new Gcp.Compute.Inputs.SecurityPolicyAdvancedOptionsConfigArgs
{
JsonCustomConfig = new Gcp.Compute.Inputs.SecurityPolicyAdvancedOptionsConfigJsonCustomConfigArgs
{
ContentTypes = new[]
{
"string",
},
},
JsonParsing = "string",
LogLevel = "string",
UserIpRequestHeaders = new[]
{
"string",
},
},
Description = "string",
Name = "string",
Project = "string",
RecaptchaOptionsConfig = new Gcp.Compute.Inputs.SecurityPolicyRecaptchaOptionsConfigArgs
{
RedirectSiteKey = "string",
},
Rules = new[]
{
new Gcp.Compute.Inputs.SecurityPolicyRuleArgs
{
Action = "string",
Match = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchArgs
{
Config = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchConfigArgs
{
SrcIpRanges = new[]
{
"string",
},
},
Expr = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchExprArgs
{
Expression = "string",
},
ExprOptions = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchExprOptionsArgs
{
RecaptchaOptions = new Gcp.Compute.Inputs.SecurityPolicyRuleMatchExprOptionsRecaptchaOptionsArgs
{
ActionTokenSiteKeys = new[]
{
"string",
},
SessionTokenSiteKeys = new[]
{
"string",
},
},
},
VersionedExpr = "string",
},
Priority = 0,
Description = "string",
HeaderAction = new Gcp.Compute.Inputs.SecurityPolicyRuleHeaderActionArgs
{
RequestHeadersToAdds = new[]
{
new Gcp.Compute.Inputs.SecurityPolicyRuleHeaderActionRequestHeadersToAddArgs
{
HeaderName = "string",
HeaderValue = "string",
},
},
},
PreconfiguredWafConfig = new Gcp.Compute.Inputs.SecurityPolicyRulePreconfiguredWafConfigArgs
{
Exclusions = new[]
{
new Gcp.Compute.Inputs.SecurityPolicyRulePreconfiguredWafConfigExclusionArgs
{
TargetRuleSet = "string",
RequestCookies = new[]
{
new Gcp.Compute.Inputs.SecurityPolicyRulePreconfiguredWafConfigExclusionRequestCookyArgs
{
Operator = "string",
Value = "string",
},
},
RequestHeaders = new[]
{
new Gcp.Compute.Inputs.SecurityPolicyRulePreconfiguredWafConfigExclusionRequestHeaderArgs
{
Operator = "string",
Value = "string",
},
},
RequestQueryParams = new[]
{
new Gcp.Compute.Inputs.SecurityPolicyRulePreconfiguredWafConfigExclusionRequestQueryParamArgs
{
Operator = "string",
Value = "string",
},
},
RequestUris = new[]
{
new Gcp.Compute.Inputs.SecurityPolicyRulePreconfiguredWafConfigExclusionRequestUriArgs
{
Operator = "string",
Value = "string",
},
},
TargetRuleIds = new[]
{
"string",
},
},
},
},
Preview = false,
RateLimitOptions = new Gcp.Compute.Inputs.SecurityPolicyRuleRateLimitOptionsArgs
{
BanDurationSec = 0,
BanThreshold = new Gcp.Compute.Inputs.SecurityPolicyRuleRateLimitOptionsBanThresholdArgs
{
Count = 0,
IntervalSec = 0,
},
ConformAction = "string",
EnforceOnKey = "string",
EnforceOnKeyConfigs = new[]
{
new Gcp.Compute.Inputs.SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfigArgs
{
EnforceOnKeyName = "string",
EnforceOnKeyType = "string",
},
},
EnforceOnKeyName = "string",
ExceedAction = "string",
ExceedRedirectOptions = new Gcp.Compute.Inputs.SecurityPolicyRuleRateLimitOptionsExceedRedirectOptionsArgs
{
Target = "string",
Type = "string",
},
RateLimitThreshold = new Gcp.Compute.Inputs.SecurityPolicyRuleRateLimitOptionsRateLimitThresholdArgs
{
Count = 0,
IntervalSec = 0,
},
},
RedirectOptions = new Gcp.Compute.Inputs.SecurityPolicyRuleRedirectOptionsArgs
{
Target = "string",
Type = "string",
},
},
},
Type = "string",
});
example, err := compute.NewSecurityPolicy(ctx, "securityPolicyResource", &compute.SecurityPolicyArgs{
AdaptiveProtectionConfig: &compute.SecurityPolicyAdaptiveProtectionConfigArgs{
AutoDeployConfig: &compute.SecurityPolicyAdaptiveProtectionConfigAutoDeployConfigArgs{
ConfidenceThreshold: pulumi.Float64(0),
ExpirationSec: pulumi.Int(0),
ImpactedBaselineThreshold: pulumi.Float64(0),
LoadThreshold: pulumi.Float64(0),
},
Layer7DdosDefenseConfig: &compute.SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigArgs{
Enable: pulumi.Bool(false),
RuleVisibility: pulumi.String("string"),
},
},
AdvancedOptionsConfig: &compute.SecurityPolicyAdvancedOptionsConfigArgs{
JsonCustomConfig: &compute.SecurityPolicyAdvancedOptionsConfigJsonCustomConfigArgs{
ContentTypes: pulumi.StringArray{
pulumi.String("string"),
},
},
JsonParsing: pulumi.String("string"),
LogLevel: pulumi.String("string"),
UserIpRequestHeaders: pulumi.StringArray{
pulumi.String("string"),
},
},
Description: pulumi.String("string"),
Name: pulumi.String("string"),
Project: pulumi.String("string"),
RecaptchaOptionsConfig: &compute.SecurityPolicyRecaptchaOptionsConfigArgs{
RedirectSiteKey: pulumi.String("string"),
},
Rules: compute.SecurityPolicyRuleTypeArray{
&compute.SecurityPolicyRuleTypeArgs{
Action: pulumi.String("string"),
Match: &compute.SecurityPolicyRuleMatchArgs{
Config: &compute.SecurityPolicyRuleMatchConfigArgs{
SrcIpRanges: pulumi.StringArray{
pulumi.String("string"),
},
},
Expr: &compute.SecurityPolicyRuleMatchExprArgs{
Expression: pulumi.String("string"),
},
ExprOptions: &compute.SecurityPolicyRuleMatchExprOptionsArgs{
RecaptchaOptions: &compute.SecurityPolicyRuleMatchExprOptionsRecaptchaOptionsArgs{
ActionTokenSiteKeys: pulumi.StringArray{
pulumi.String("string"),
},
SessionTokenSiteKeys: pulumi.StringArray{
pulumi.String("string"),
},
},
},
VersionedExpr: pulumi.String("string"),
},
Priority: pulumi.Int(0),
Description: pulumi.String("string"),
HeaderAction: &compute.SecurityPolicyRuleHeaderActionArgs{
RequestHeadersToAdds: compute.SecurityPolicyRuleHeaderActionRequestHeadersToAddArray{
&compute.SecurityPolicyRuleHeaderActionRequestHeadersToAddArgs{
HeaderName: pulumi.String("string"),
HeaderValue: pulumi.String("string"),
},
},
},
PreconfiguredWafConfig: &compute.SecurityPolicyRulePreconfiguredWafConfigArgs{
Exclusions: compute.SecurityPolicyRulePreconfiguredWafConfigExclusionArray{
&compute.SecurityPolicyRulePreconfiguredWafConfigExclusionArgs{
TargetRuleSet: pulumi.String("string"),
RequestCookies: compute.SecurityPolicyRulePreconfiguredWafConfigExclusionRequestCookyArray{
&compute.SecurityPolicyRulePreconfiguredWafConfigExclusionRequestCookyArgs{
Operator: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
RequestHeaders: compute.SecurityPolicyRulePreconfiguredWafConfigExclusionRequestHeaderArray{
&compute.SecurityPolicyRulePreconfiguredWafConfigExclusionRequestHeaderArgs{
Operator: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
RequestQueryParams: compute.SecurityPolicyRulePreconfiguredWafConfigExclusionRequestQueryParamArray{
&compute.SecurityPolicyRulePreconfiguredWafConfigExclusionRequestQueryParamArgs{
Operator: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
RequestUris: compute.SecurityPolicyRulePreconfiguredWafConfigExclusionRequestUriArray{
&compute.SecurityPolicyRulePreconfiguredWafConfigExclusionRequestUriArgs{
Operator: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
TargetRuleIds: pulumi.StringArray{
pulumi.String("string"),
},
},
},
},
Preview: pulumi.Bool(false),
RateLimitOptions: &compute.SecurityPolicyRuleRateLimitOptionsArgs{
BanDurationSec: pulumi.Int(0),
BanThreshold: &compute.SecurityPolicyRuleRateLimitOptionsBanThresholdArgs{
Count: pulumi.Int(0),
IntervalSec: pulumi.Int(0),
},
ConformAction: pulumi.String("string"),
EnforceOnKey: pulumi.String("string"),
EnforceOnKeyConfigs: compute.SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfigArray{
&compute.SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfigArgs{
EnforceOnKeyName: pulumi.String("string"),
EnforceOnKeyType: pulumi.String("string"),
},
},
EnforceOnKeyName: pulumi.String("string"),
ExceedAction: pulumi.String("string"),
ExceedRedirectOptions: &compute.SecurityPolicyRuleRateLimitOptionsExceedRedirectOptionsArgs{
Target: pulumi.String("string"),
Type: pulumi.String("string"),
},
RateLimitThreshold: &compute.SecurityPolicyRuleRateLimitOptionsRateLimitThresholdArgs{
Count: pulumi.Int(0),
IntervalSec: pulumi.Int(0),
},
},
RedirectOptions: &compute.SecurityPolicyRuleRedirectOptionsArgs{
Target: pulumi.String("string"),
Type: pulumi.String("string"),
},
},
},
Type: pulumi.String("string"),
})
var securityPolicyResource = new SecurityPolicy("securityPolicyResource", SecurityPolicyArgs.builder()
.adaptiveProtectionConfig(SecurityPolicyAdaptiveProtectionConfigArgs.builder()
.autoDeployConfig(SecurityPolicyAdaptiveProtectionConfigAutoDeployConfigArgs.builder()
.confidenceThreshold(0)
.expirationSec(0)
.impactedBaselineThreshold(0)
.loadThreshold(0)
.build())
.layer7DdosDefenseConfig(SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigArgs.builder()
.enable(false)
.ruleVisibility("string")
.build())
.build())
.advancedOptionsConfig(SecurityPolicyAdvancedOptionsConfigArgs.builder()
.jsonCustomConfig(SecurityPolicyAdvancedOptionsConfigJsonCustomConfigArgs.builder()
.contentTypes("string")
.build())
.jsonParsing("string")
.logLevel("string")
.userIpRequestHeaders("string")
.build())
.description("string")
.name("string")
.project("string")
.recaptchaOptionsConfig(SecurityPolicyRecaptchaOptionsConfigArgs.builder()
.redirectSiteKey("string")
.build())
.rules(SecurityPolicyRuleArgs.builder()
.action("string")
.match(SecurityPolicyRuleMatchArgs.builder()
.config(SecurityPolicyRuleMatchConfigArgs.builder()
.srcIpRanges("string")
.build())
.expr(SecurityPolicyRuleMatchExprArgs.builder()
.expression("string")
.build())
.exprOptions(SecurityPolicyRuleMatchExprOptionsArgs.builder()
.recaptchaOptions(SecurityPolicyRuleMatchExprOptionsRecaptchaOptionsArgs.builder()
.actionTokenSiteKeys("string")
.sessionTokenSiteKeys("string")
.build())
.build())
.versionedExpr("string")
.build())
.priority(0)
.description("string")
.headerAction(SecurityPolicyRuleHeaderActionArgs.builder()
.requestHeadersToAdds(SecurityPolicyRuleHeaderActionRequestHeadersToAddArgs.builder()
.headerName("string")
.headerValue("string")
.build())
.build())
.preconfiguredWafConfig(SecurityPolicyRulePreconfiguredWafConfigArgs.builder()
.exclusions(SecurityPolicyRulePreconfiguredWafConfigExclusionArgs.builder()
.targetRuleSet("string")
.requestCookies(SecurityPolicyRulePreconfiguredWafConfigExclusionRequestCookyArgs.builder()
.operator("string")
.value("string")
.build())
.requestHeaders(SecurityPolicyRulePreconfiguredWafConfigExclusionRequestHeaderArgs.builder()
.operator("string")
.value("string")
.build())
.requestQueryParams(SecurityPolicyRulePreconfiguredWafConfigExclusionRequestQueryParamArgs.builder()
.operator("string")
.value("string")
.build())
.requestUris(SecurityPolicyRulePreconfiguredWafConfigExclusionRequestUriArgs.builder()
.operator("string")
.value("string")
.build())
.targetRuleIds("string")
.build())
.build())
.preview(false)
.rateLimitOptions(SecurityPolicyRuleRateLimitOptionsArgs.builder()
.banDurationSec(0)
.banThreshold(SecurityPolicyRuleRateLimitOptionsBanThresholdArgs.builder()
.count(0)
.intervalSec(0)
.build())
.conformAction("string")
.enforceOnKey("string")
.enforceOnKeyConfigs(SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfigArgs.builder()
.enforceOnKeyName("string")
.enforceOnKeyType("string")
.build())
.enforceOnKeyName("string")
.exceedAction("string")
.exceedRedirectOptions(SecurityPolicyRuleRateLimitOptionsExceedRedirectOptionsArgs.builder()
.target("string")
.type("string")
.build())
.rateLimitThreshold(SecurityPolicyRuleRateLimitOptionsRateLimitThresholdArgs.builder()
.count(0)
.intervalSec(0)
.build())
.build())
.redirectOptions(SecurityPolicyRuleRedirectOptionsArgs.builder()
.target("string")
.type("string")
.build())
.build())
.type("string")
.build());
security_policy_resource = gcp.compute.SecurityPolicy("securityPolicyResource",
adaptive_protection_config={
"auto_deploy_config": {
"confidence_threshold": 0,
"expiration_sec": 0,
"impacted_baseline_threshold": 0,
"load_threshold": 0,
},
"layer7_ddos_defense_config": {
"enable": False,
"rule_visibility": "string",
},
},
advanced_options_config={
"json_custom_config": {
"content_types": ["string"],
},
"json_parsing": "string",
"log_level": "string",
"user_ip_request_headers": ["string"],
},
description="string",
name="string",
project="string",
recaptcha_options_config={
"redirect_site_key": "string",
},
rules=[{
"action": "string",
"match": {
"config": {
"src_ip_ranges": ["string"],
},
"expr": {
"expression": "string",
},
"expr_options": {
"recaptcha_options": {
"action_token_site_keys": ["string"],
"session_token_site_keys": ["string"],
},
},
"versioned_expr": "string",
},
"priority": 0,
"description": "string",
"header_action": {
"request_headers_to_adds": [{
"header_name": "string",
"header_value": "string",
}],
},
"preconfigured_waf_config": {
"exclusions": [{
"target_rule_set": "string",
"request_cookies": [{
"operator": "string",
"value": "string",
}],
"request_headers": [{
"operator": "string",
"value": "string",
}],
"request_query_params": [{
"operator": "string",
"value": "string",
}],
"request_uris": [{
"operator": "string",
"value": "string",
}],
"target_rule_ids": ["string"],
}],
},
"preview": False,
"rate_limit_options": {
"ban_duration_sec": 0,
"ban_threshold": {
"count": 0,
"interval_sec": 0,
},
"conform_action": "string",
"enforce_on_key": "string",
"enforce_on_key_configs": [{
"enforce_on_key_name": "string",
"enforce_on_key_type": "string",
}],
"enforce_on_key_name": "string",
"exceed_action": "string",
"exceed_redirect_options": {
"target": "string",
"type": "string",
},
"rate_limit_threshold": {
"count": 0,
"interval_sec": 0,
},
},
"redirect_options": {
"target": "string",
"type": "string",
},
}],
type="string")
const securityPolicyResource = new gcp.compute.SecurityPolicy("securityPolicyResource", {
adaptiveProtectionConfig: {
autoDeployConfig: {
confidenceThreshold: 0,
expirationSec: 0,
impactedBaselineThreshold: 0,
loadThreshold: 0,
},
layer7DdosDefenseConfig: {
enable: false,
ruleVisibility: "string",
},
},
advancedOptionsConfig: {
jsonCustomConfig: {
contentTypes: ["string"],
},
jsonParsing: "string",
logLevel: "string",
userIpRequestHeaders: ["string"],
},
description: "string",
name: "string",
project: "string",
recaptchaOptionsConfig: {
redirectSiteKey: "string",
},
rules: [{
action: "string",
match: {
config: {
srcIpRanges: ["string"],
},
expr: {
expression: "string",
},
exprOptions: {
recaptchaOptions: {
actionTokenSiteKeys: ["string"],
sessionTokenSiteKeys: ["string"],
},
},
versionedExpr: "string",
},
priority: 0,
description: "string",
headerAction: {
requestHeadersToAdds: [{
headerName: "string",
headerValue: "string",
}],
},
preconfiguredWafConfig: {
exclusions: [{
targetRuleSet: "string",
requestCookies: [{
operator: "string",
value: "string",
}],
requestHeaders: [{
operator: "string",
value: "string",
}],
requestQueryParams: [{
operator: "string",
value: "string",
}],
requestUris: [{
operator: "string",
value: "string",
}],
targetRuleIds: ["string"],
}],
},
preview: false,
rateLimitOptions: {
banDurationSec: 0,
banThreshold: {
count: 0,
intervalSec: 0,
},
conformAction: "string",
enforceOnKey: "string",
enforceOnKeyConfigs: [{
enforceOnKeyName: "string",
enforceOnKeyType: "string",
}],
enforceOnKeyName: "string",
exceedAction: "string",
exceedRedirectOptions: {
target: "string",
type: "string",
},
rateLimitThreshold: {
count: 0,
intervalSec: 0,
},
},
redirectOptions: {
target: "string",
type: "string",
},
}],
type: "string",
});
type: gcp:compute:SecurityPolicy
properties:
adaptiveProtectionConfig:
autoDeployConfig:
confidenceThreshold: 0
expirationSec: 0
impactedBaselineThreshold: 0
loadThreshold: 0
layer7DdosDefenseConfig:
enable: false
ruleVisibility: string
advancedOptionsConfig:
jsonCustomConfig:
contentTypes:
- string
jsonParsing: string
logLevel: string
userIpRequestHeaders:
- string
description: string
name: string
project: string
recaptchaOptionsConfig:
redirectSiteKey: string
rules:
- action: string
description: string
headerAction:
requestHeadersToAdds:
- headerName: string
headerValue: string
match:
config:
srcIpRanges:
- string
expr:
expression: string
exprOptions:
recaptchaOptions:
actionTokenSiteKeys:
- string
sessionTokenSiteKeys:
- string
versionedExpr: string
preconfiguredWafConfig:
exclusions:
- requestCookies:
- operator: string
value: string
requestHeaders:
- operator: string
value: string
requestQueryParams:
- operator: string
value: string
requestUris:
- operator: string
value: string
targetRuleIds:
- string
targetRuleSet: string
preview: false
priority: 0
rateLimitOptions:
banDurationSec: 0
banThreshold:
count: 0
intervalSec: 0
conformAction: string
enforceOnKey: string
enforceOnKeyConfigs:
- enforceOnKeyName: string
enforceOnKeyType: string
enforceOnKeyName: string
exceedAction: string
exceedRedirectOptions:
target: string
type: string
rateLimitThreshold:
count: 0
intervalSec: 0
redirectOptions:
target: string
type: string
type: string
SecurityPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The SecurityPolicy resource accepts the following input properties:
- Adaptive
Protection SecurityConfig Policy Adaptive Protection Config - Configuration for Google Cloud Armor Adaptive Protection. Structure is documented below.
- Advanced
Options SecurityConfig Policy Advanced Options Config - Advanced Configuration Options. Structure is documented below.
- Description string
- An optional description of this security policy. Max size is 2048.
- Name string
- The name of the security policy.
- Project string
- The project in which the resource belongs. If it is not provided, the provider project is used.
- Recaptcha
Options SecurityConfig Policy Recaptcha Options Config - reCAPTCHA Configuration Options. Structure is documented below.
- Rules
List<Security
Policy Rule> - The set of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" will be added. Structure is documented below.
- Type string
- The type indicates the intended use of the security policy. This field can be set only at resource creation time.
CLOUD_ARMOR
- Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers.CLOUD_ARMOR_EDGE
- Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache.CLOUD_ARMOR_INTERNAL_SERVICE
- Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application.
- Adaptive
Protection SecurityConfig Policy Adaptive Protection Config Args - Configuration for Google Cloud Armor Adaptive Protection. Structure is documented below.
- Advanced
Options SecurityConfig Policy Advanced Options Config Args - Advanced Configuration Options. Structure is documented below.
- Description string
- An optional description of this security policy. Max size is 2048.
- Name string
- The name of the security policy.
- Project string
- The project in which the resource belongs. If it is not provided, the provider project is used.
- Recaptcha
Options SecurityConfig Policy Recaptcha Options Config Args - reCAPTCHA Configuration Options. Structure is documented below.
- Rules
[]Security
Policy Rule Type Args - The set of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" will be added. Structure is documented below.
- Type string
- The type indicates the intended use of the security policy. This field can be set only at resource creation time.
CLOUD_ARMOR
- Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers.CLOUD_ARMOR_EDGE
- Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache.CLOUD_ARMOR_INTERNAL_SERVICE
- Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application.
- adaptive
Protection SecurityConfig Policy Adaptive Protection Config - Configuration for Google Cloud Armor Adaptive Protection. Structure is documented below.
- advanced
Options SecurityConfig Policy Advanced Options Config - Advanced Configuration Options. Structure is documented below.
- description String
- An optional description of this security policy. Max size is 2048.
- name String
- The name of the security policy.
- project String
- The project in which the resource belongs. If it is not provided, the provider project is used.
- recaptcha
Options SecurityConfig Policy Recaptcha Options Config - reCAPTCHA Configuration Options. Structure is documented below.
- rules
List<Security
Policy Rule> - The set of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" will be added. Structure is documented below.
- type String
- The type indicates the intended use of the security policy. This field can be set only at resource creation time.
CLOUD_ARMOR
- Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers.CLOUD_ARMOR_EDGE
- Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache.CLOUD_ARMOR_INTERNAL_SERVICE
- Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application.
- adaptive
Protection SecurityConfig Policy Adaptive Protection Config - Configuration for Google Cloud Armor Adaptive Protection. Structure is documented below.
- advanced
Options SecurityConfig Policy Advanced Options Config - Advanced Configuration Options. Structure is documented below.
- description string
- An optional description of this security policy. Max size is 2048.
- name string
- The name of the security policy.
- project string
- The project in which the resource belongs. If it is not provided, the provider project is used.
- recaptcha
Options SecurityConfig Policy Recaptcha Options Config - reCAPTCHA Configuration Options. Structure is documented below.
- rules
Security
Policy Rule[] - The set of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" will be added. Structure is documented below.
- type string
- The type indicates the intended use of the security policy. This field can be set only at resource creation time.
CLOUD_ARMOR
- Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers.CLOUD_ARMOR_EDGE
- Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache.CLOUD_ARMOR_INTERNAL_SERVICE
- Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application.
- adaptive_
protection_ Securityconfig Policy Adaptive Protection Config Args - Configuration for Google Cloud Armor Adaptive Protection. Structure is documented below.
- advanced_
options_ Securityconfig Policy Advanced Options Config Args - Advanced Configuration Options. Structure is documented below.
- description str
- An optional description of this security policy. Max size is 2048.
- name str
- The name of the security policy.
- project str
- The project in which the resource belongs. If it is not provided, the provider project is used.
- recaptcha_
options_ Securityconfig Policy Recaptcha Options Config Args - reCAPTCHA Configuration Options. Structure is documented below.
- rules
Sequence[Security
Policy Rule Args] - The set of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" will be added. Structure is documented below.
- type str
- The type indicates the intended use of the security policy. This field can be set only at resource creation time.
CLOUD_ARMOR
- Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers.CLOUD_ARMOR_EDGE
- Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache.CLOUD_ARMOR_INTERNAL_SERVICE
- Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application.
- adaptive
Protection Property MapConfig - Configuration for Google Cloud Armor Adaptive Protection. Structure is documented below.
- advanced
Options Property MapConfig - Advanced Configuration Options. Structure is documented below.
- description String
- An optional description of this security policy. Max size is 2048.
- name String
- The name of the security policy.
- project String
- The project in which the resource belongs. If it is not provided, the provider project is used.
- recaptcha
Options Property MapConfig - reCAPTCHA Configuration Options. Structure is documented below.
- rules List<Property Map>
- The set of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" will be added. Structure is documented below.
- type String
- The type indicates the intended use of the security policy. This field can be set only at resource creation time.
CLOUD_ARMOR
- Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers.CLOUD_ARMOR_EDGE
- Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache.CLOUD_ARMOR_INTERNAL_SERVICE
- Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application.
Outputs
All input properties are implicitly available as output properties. Additionally, the SecurityPolicy resource produces the following output properties:
- Fingerprint string
- Fingerprint of this resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Self
Link string - The URI of the created resource.
- Fingerprint string
- Fingerprint of this resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Self
Link string - The URI of the created resource.
- fingerprint String
- Fingerprint of this resource.
- id String
- The provider-assigned unique ID for this managed resource.
- self
Link String - The URI of the created resource.
- fingerprint string
- Fingerprint of this resource.
- id string
- The provider-assigned unique ID for this managed resource.
- self
Link string - The URI of the created resource.
- fingerprint str
- Fingerprint of this resource.
- id str
- The provider-assigned unique ID for this managed resource.
- self_
link str - The URI of the created resource.
- fingerprint String
- Fingerprint of this resource.
- id String
- The provider-assigned unique ID for this managed resource.
- self
Link String - The URI of the created resource.
Look up Existing SecurityPolicy Resource
Get an existing SecurityPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: SecurityPolicyState, opts?: CustomResourceOptions): SecurityPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
adaptive_protection_config: Optional[SecurityPolicyAdaptiveProtectionConfigArgs] = None,
advanced_options_config: Optional[SecurityPolicyAdvancedOptionsConfigArgs] = None,
description: Optional[str] = None,
fingerprint: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
recaptcha_options_config: Optional[SecurityPolicyRecaptchaOptionsConfigArgs] = None,
rules: Optional[Sequence[SecurityPolicyRuleArgs]] = None,
self_link: Optional[str] = None,
type: Optional[str] = None) -> SecurityPolicy
func GetSecurityPolicy(ctx *Context, name string, id IDInput, state *SecurityPolicyState, opts ...ResourceOption) (*SecurityPolicy, error)
public static SecurityPolicy Get(string name, Input<string> id, SecurityPolicyState? state, CustomResourceOptions? opts = null)
public static SecurityPolicy get(String name, Output<String> id, SecurityPolicyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Adaptive
Protection SecurityConfig Policy Adaptive Protection Config - Configuration for Google Cloud Armor Adaptive Protection. Structure is documented below.
- Advanced
Options SecurityConfig Policy Advanced Options Config - Advanced Configuration Options. Structure is documented below.
- Description string
- An optional description of this security policy. Max size is 2048.
- Fingerprint string
- Fingerprint of this resource.
- Name string
- The name of the security policy.
- Project string
- The project in which the resource belongs. If it is not provided, the provider project is used.
- Recaptcha
Options SecurityConfig Policy Recaptcha Options Config - reCAPTCHA Configuration Options. Structure is documented below.
- Rules
List<Security
Policy Rule> - The set of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" will be added. Structure is documented below.
- Self
Link string - The URI of the created resource.
- Type string
- The type indicates the intended use of the security policy. This field can be set only at resource creation time.
CLOUD_ARMOR
- Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers.CLOUD_ARMOR_EDGE
- Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache.CLOUD_ARMOR_INTERNAL_SERVICE
- Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application.
- Adaptive
Protection SecurityConfig Policy Adaptive Protection Config Args - Configuration for Google Cloud Armor Adaptive Protection. Structure is documented below.
- Advanced
Options SecurityConfig Policy Advanced Options Config Args - Advanced Configuration Options. Structure is documented below.
- Description string
- An optional description of this security policy. Max size is 2048.
- Fingerprint string
- Fingerprint of this resource.
- Name string
- The name of the security policy.
- Project string
- The project in which the resource belongs. If it is not provided, the provider project is used.
- Recaptcha
Options SecurityConfig Policy Recaptcha Options Config Args - reCAPTCHA Configuration Options. Structure is documented below.
- Rules
[]Security
Policy Rule Type Args - The set of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" will be added. Structure is documented below.
- Self
Link string - The URI of the created resource.
- Type string
- The type indicates the intended use of the security policy. This field can be set only at resource creation time.
CLOUD_ARMOR
- Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers.CLOUD_ARMOR_EDGE
- Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache.CLOUD_ARMOR_INTERNAL_SERVICE
- Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application.
- adaptive
Protection SecurityConfig Policy Adaptive Protection Config - Configuration for Google Cloud Armor Adaptive Protection. Structure is documented below.
- advanced
Options SecurityConfig Policy Advanced Options Config - Advanced Configuration Options. Structure is documented below.
- description String
- An optional description of this security policy. Max size is 2048.
- fingerprint String
- Fingerprint of this resource.
- name String
- The name of the security policy.
- project String
- The project in which the resource belongs. If it is not provided, the provider project is used.
- recaptcha
Options SecurityConfig Policy Recaptcha Options Config - reCAPTCHA Configuration Options. Structure is documented below.
- rules
List<Security
Policy Rule> - The set of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" will be added. Structure is documented below.
- self
Link String - The URI of the created resource.
- type String
- The type indicates the intended use of the security policy. This field can be set only at resource creation time.
CLOUD_ARMOR
- Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers.CLOUD_ARMOR_EDGE
- Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache.CLOUD_ARMOR_INTERNAL_SERVICE
- Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application.
- adaptive
Protection SecurityConfig Policy Adaptive Protection Config - Configuration for Google Cloud Armor Adaptive Protection. Structure is documented below.
- advanced
Options SecurityConfig Policy Advanced Options Config - Advanced Configuration Options. Structure is documented below.
- description string
- An optional description of this security policy. Max size is 2048.
- fingerprint string
- Fingerprint of this resource.
- name string
- The name of the security policy.
- project string
- The project in which the resource belongs. If it is not provided, the provider project is used.
- recaptcha
Options SecurityConfig Policy Recaptcha Options Config - reCAPTCHA Configuration Options. Structure is documented below.
- rules
Security
Policy Rule[] - The set of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" will be added. Structure is documented below.
- self
Link string - The URI of the created resource.
- type string
- The type indicates the intended use of the security policy. This field can be set only at resource creation time.
CLOUD_ARMOR
- Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers.CLOUD_ARMOR_EDGE
- Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache.CLOUD_ARMOR_INTERNAL_SERVICE
- Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application.
- adaptive_
protection_ Securityconfig Policy Adaptive Protection Config Args - Configuration for Google Cloud Armor Adaptive Protection. Structure is documented below.
- advanced_
options_ Securityconfig Policy Advanced Options Config Args - Advanced Configuration Options. Structure is documented below.
- description str
- An optional description of this security policy. Max size is 2048.
- fingerprint str
- Fingerprint of this resource.
- name str
- The name of the security policy.
- project str
- The project in which the resource belongs. If it is not provided, the provider project is used.
- recaptcha_
options_ Securityconfig Policy Recaptcha Options Config Args - reCAPTCHA Configuration Options. Structure is documented below.
- rules
Sequence[Security
Policy Rule Args] - The set of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" will be added. Structure is documented below.
- self_
link str - The URI of the created resource.
- type str
- The type indicates the intended use of the security policy. This field can be set only at resource creation time.
CLOUD_ARMOR
- Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers.CLOUD_ARMOR_EDGE
- Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache.CLOUD_ARMOR_INTERNAL_SERVICE
- Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application.
- adaptive
Protection Property MapConfig - Configuration for Google Cloud Armor Adaptive Protection. Structure is documented below.
- advanced
Options Property MapConfig - Advanced Configuration Options. Structure is documented below.
- description String
- An optional description of this security policy. Max size is 2048.
- fingerprint String
- Fingerprint of this resource.
- name String
- The name of the security policy.
- project String
- The project in which the resource belongs. If it is not provided, the provider project is used.
- recaptcha
Options Property MapConfig - reCAPTCHA Configuration Options. Structure is documented below.
- rules List<Property Map>
- The set of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" will be added. Structure is documented below.
- self
Link String - The URI of the created resource.
- type String
- The type indicates the intended use of the security policy. This field can be set only at resource creation time.
CLOUD_ARMOR
- Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers.CLOUD_ARMOR_EDGE
- Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache.CLOUD_ARMOR_INTERNAL_SERVICE
- Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application.
Supporting Types
SecurityPolicyAdaptiveProtectionConfig, SecurityPolicyAdaptiveProtectionConfigArgs
- Auto
Deploy SecurityConfig Policy Adaptive Protection Config Auto Deploy Config Configuration for Automatically deploy Adaptive Protection suggested rules. Structure is documented below.
The
layer_7_ddos_defense_config
block supports:- Layer7Ddos
Defense SecurityConfig Policy Adaptive Protection Config Layer7Ddos Defense Config - Configuration for Google Cloud Armor Adaptive Protection Layer 7 DDoS Defense. Structure is documented below.
- Auto
Deploy SecurityConfig Policy Adaptive Protection Config Auto Deploy Config Configuration for Automatically deploy Adaptive Protection suggested rules. Structure is documented below.
The
layer_7_ddos_defense_config
block supports:- Layer7Ddos
Defense SecurityConfig Policy Adaptive Protection Config Layer7Ddos Defense Config - Configuration for Google Cloud Armor Adaptive Protection Layer 7 DDoS Defense. Structure is documented below.
- auto
Deploy SecurityConfig Policy Adaptive Protection Config Auto Deploy Config Configuration for Automatically deploy Adaptive Protection suggested rules. Structure is documented below.
The
layer_7_ddos_defense_config
block supports:- layer7Ddos
Defense SecurityConfig Policy Adaptive Protection Config Layer7Ddos Defense Config - Configuration for Google Cloud Armor Adaptive Protection Layer 7 DDoS Defense. Structure is documented below.
- auto
Deploy SecurityConfig Policy Adaptive Protection Config Auto Deploy Config Configuration for Automatically deploy Adaptive Protection suggested rules. Structure is documented below.
The
layer_7_ddos_defense_config
block supports:- layer7Ddos
Defense SecurityConfig Policy Adaptive Protection Config Layer7Ddos Defense Config - Configuration for Google Cloud Armor Adaptive Protection Layer 7 DDoS Defense. Structure is documented below.
- auto_
deploy_ Securityconfig Policy Adaptive Protection Config Auto Deploy Config Configuration for Automatically deploy Adaptive Protection suggested rules. Structure is documented below.
The
layer_7_ddos_defense_config
block supports:- layer7_
ddos_ Securitydefense_ config Policy Adaptive Protection Config Layer7Ddos Defense Config - Configuration for Google Cloud Armor Adaptive Protection Layer 7 DDoS Defense. Structure is documented below.
- auto
Deploy Property MapConfig Configuration for Automatically deploy Adaptive Protection suggested rules. Structure is documented below.
The
layer_7_ddos_defense_config
block supports:- layer7Ddos
Defense Property MapConfig - Configuration for Google Cloud Armor Adaptive Protection Layer 7 DDoS Defense. Structure is documented below.
SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig, SecurityPolicyAdaptiveProtectionConfigAutoDeployConfigArgs
- Confidence
Threshold double - Rules are only automatically deployed for alerts on potential attacks with confidence scores greater than this threshold.
- Expiration
Sec int - Google Cloud Armor stops applying the action in the automatically deployed rule to an identified attacker after this duration. The rule continues to operate against new requests.
- Impacted
Baseline doubleThreshold - Rules are only automatically deployed when the estimated impact to baseline traffic from the suggested mitigation is below this threshold.
- Load
Threshold double - Identifies new attackers only when the load to the backend service that is under attack exceeds this threshold.
- Confidence
Threshold float64 - Rules are only automatically deployed for alerts on potential attacks with confidence scores greater than this threshold.
- Expiration
Sec int - Google Cloud Armor stops applying the action in the automatically deployed rule to an identified attacker after this duration. The rule continues to operate against new requests.
- Impacted
Baseline float64Threshold - Rules are only automatically deployed when the estimated impact to baseline traffic from the suggested mitigation is below this threshold.
- Load
Threshold float64 - Identifies new attackers only when the load to the backend service that is under attack exceeds this threshold.
- confidence
Threshold Double - Rules are only automatically deployed for alerts on potential attacks with confidence scores greater than this threshold.
- expiration
Sec Integer - Google Cloud Armor stops applying the action in the automatically deployed rule to an identified attacker after this duration. The rule continues to operate against new requests.
- impacted
Baseline DoubleThreshold - Rules are only automatically deployed when the estimated impact to baseline traffic from the suggested mitigation is below this threshold.
- load
Threshold Double - Identifies new attackers only when the load to the backend service that is under attack exceeds this threshold.
- confidence
Threshold number - Rules are only automatically deployed for alerts on potential attacks with confidence scores greater than this threshold.
- expiration
Sec number - Google Cloud Armor stops applying the action in the automatically deployed rule to an identified attacker after this duration. The rule continues to operate against new requests.
- impacted
Baseline numberThreshold - Rules are only automatically deployed when the estimated impact to baseline traffic from the suggested mitigation is below this threshold.
- load
Threshold number - Identifies new attackers only when the load to the backend service that is under attack exceeds this threshold.
- confidence_
threshold float - Rules are only automatically deployed for alerts on potential attacks with confidence scores greater than this threshold.
- expiration_
sec int - Google Cloud Armor stops applying the action in the automatically deployed rule to an identified attacker after this duration. The rule continues to operate against new requests.
- impacted_
baseline_ floatthreshold - Rules are only automatically deployed when the estimated impact to baseline traffic from the suggested mitigation is below this threshold.
- load_
threshold float - Identifies new attackers only when the load to the backend service that is under attack exceeds this threshold.
- confidence
Threshold Number - Rules are only automatically deployed for alerts on potential attacks with confidence scores greater than this threshold.
- expiration
Sec Number - Google Cloud Armor stops applying the action in the automatically deployed rule to an identified attacker after this duration. The rule continues to operate against new requests.
- impacted
Baseline NumberThreshold - Rules are only automatically deployed when the estimated impact to baseline traffic from the suggested mitigation is below this threshold.
- load
Threshold Number - Identifies new attackers only when the load to the backend service that is under attack exceeds this threshold.
SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig, SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigArgs
- Enable bool
- If set to true, enables CAAP for L7 DDoS detection.
- Rule
Visibility string - Rule visibility. Supported values include: "STANDARD", "PREMIUM".
- Enable bool
- If set to true, enables CAAP for L7 DDoS detection.
- Rule
Visibility string - Rule visibility. Supported values include: "STANDARD", "PREMIUM".
- enable Boolean
- If set to true, enables CAAP for L7 DDoS detection.
- rule
Visibility String - Rule visibility. Supported values include: "STANDARD", "PREMIUM".
- enable boolean
- If set to true, enables CAAP for L7 DDoS detection.
- rule
Visibility string - Rule visibility. Supported values include: "STANDARD", "PREMIUM".
- enable bool
- If set to true, enables CAAP for L7 DDoS detection.
- rule_
visibility str - Rule visibility. Supported values include: "STANDARD", "PREMIUM".
- enable Boolean
- If set to true, enables CAAP for L7 DDoS detection.
- rule
Visibility String - Rule visibility. Supported values include: "STANDARD", "PREMIUM".
SecurityPolicyAdvancedOptionsConfig, SecurityPolicyAdvancedOptionsConfigArgs
- Json
Custom SecurityConfig Policy Advanced Options Config Json Custom Config - Custom configuration to apply the JSON parsing. Only applicable when
json_parsing
is set toSTANDARD
. Structure is documented below. - Json
Parsing string - Whether or not to JSON parse the payload body. Defaults to
DISABLED
.DISABLED
- Don't parse JSON payloads in POST bodies.STANDARD
- Parse JSON payloads in POST bodies.STANDARD_WITH_GRAPHQL
- Parse JSON and GraphQL payloads in POST bodies.
- Log
Level string - Log level to use. Defaults to
NORMAL
.NORMAL
- Normal log level.VERBOSE
- Verbose log level.
- User
Ip List<string>Request Headers - An optional list of case-insensitive request header names to use for resolving the callers client IP address.
- Json
Custom SecurityConfig Policy Advanced Options Config Json Custom Config - Custom configuration to apply the JSON parsing. Only applicable when
json_parsing
is set toSTANDARD
. Structure is documented below. - Json
Parsing string - Whether or not to JSON parse the payload body. Defaults to
DISABLED
.DISABLED
- Don't parse JSON payloads in POST bodies.STANDARD
- Parse JSON payloads in POST bodies.STANDARD_WITH_GRAPHQL
- Parse JSON and GraphQL payloads in POST bodies.
- Log
Level string - Log level to use. Defaults to
NORMAL
.NORMAL
- Normal log level.VERBOSE
- Verbose log level.
- User
Ip []stringRequest Headers - An optional list of case-insensitive request header names to use for resolving the callers client IP address.
- json
Custom SecurityConfig Policy Advanced Options Config Json Custom Config - Custom configuration to apply the JSON parsing. Only applicable when
json_parsing
is set toSTANDARD
. Structure is documented below. - json
Parsing String - Whether or not to JSON parse the payload body. Defaults to
DISABLED
.DISABLED
- Don't parse JSON payloads in POST bodies.STANDARD
- Parse JSON payloads in POST bodies.STANDARD_WITH_GRAPHQL
- Parse JSON and GraphQL payloads in POST bodies.
- log
Level String - Log level to use. Defaults to
NORMAL
.NORMAL
- Normal log level.VERBOSE
- Verbose log level.
- user
Ip List<String>Request Headers - An optional list of case-insensitive request header names to use for resolving the callers client IP address.
- json
Custom SecurityConfig Policy Advanced Options Config Json Custom Config - Custom configuration to apply the JSON parsing. Only applicable when
json_parsing
is set toSTANDARD
. Structure is documented below. - json
Parsing string - Whether or not to JSON parse the payload body. Defaults to
DISABLED
.DISABLED
- Don't parse JSON payloads in POST bodies.STANDARD
- Parse JSON payloads in POST bodies.STANDARD_WITH_GRAPHQL
- Parse JSON and GraphQL payloads in POST bodies.
- log
Level string - Log level to use. Defaults to
NORMAL
.NORMAL
- Normal log level.VERBOSE
- Verbose log level.
- user
Ip string[]Request Headers - An optional list of case-insensitive request header names to use for resolving the callers client IP address.
- json_
custom_ Securityconfig Policy Advanced Options Config Json Custom Config - Custom configuration to apply the JSON parsing. Only applicable when
json_parsing
is set toSTANDARD
. Structure is documented below. - json_
parsing str - Whether or not to JSON parse the payload body. Defaults to
DISABLED
.DISABLED
- Don't parse JSON payloads in POST bodies.STANDARD
- Parse JSON payloads in POST bodies.STANDARD_WITH_GRAPHQL
- Parse JSON and GraphQL payloads in POST bodies.
- log_
level str - Log level to use. Defaults to
NORMAL
.NORMAL
- Normal log level.VERBOSE
- Verbose log level.
- user_
ip_ Sequence[str]request_ headers - An optional list of case-insensitive request header names to use for resolving the callers client IP address.
- json
Custom Property MapConfig - Custom configuration to apply the JSON parsing. Only applicable when
json_parsing
is set toSTANDARD
. Structure is documented below. - json
Parsing String - Whether or not to JSON parse the payload body. Defaults to
DISABLED
.DISABLED
- Don't parse JSON payloads in POST bodies.STANDARD
- Parse JSON payloads in POST bodies.STANDARD_WITH_GRAPHQL
- Parse JSON and GraphQL payloads in POST bodies.
- log
Level String - Log level to use. Defaults to
NORMAL
.NORMAL
- Normal log level.VERBOSE
- Verbose log level.
- user
Ip List<String>Request Headers - An optional list of case-insensitive request header names to use for resolving the callers client IP address.
SecurityPolicyAdvancedOptionsConfigJsonCustomConfig, SecurityPolicyAdvancedOptionsConfigJsonCustomConfigArgs
- Content
Types List<string> - A list of custom Content-Type header values to apply the JSON parsing. The format of the Content-Type header values is defined in RFC 1341. When configuring a custom Content-Type header value, only the type/subtype needs to be specified, and the parameters should be excluded.
- Content
Types []string - A list of custom Content-Type header values to apply the JSON parsing. The format of the Content-Type header values is defined in RFC 1341. When configuring a custom Content-Type header value, only the type/subtype needs to be specified, and the parameters should be excluded.
- content
Types List<String> - A list of custom Content-Type header values to apply the JSON parsing. The format of the Content-Type header values is defined in RFC 1341. When configuring a custom Content-Type header value, only the type/subtype needs to be specified, and the parameters should be excluded.
- content
Types string[] - A list of custom Content-Type header values to apply the JSON parsing. The format of the Content-Type header values is defined in RFC 1341. When configuring a custom Content-Type header value, only the type/subtype needs to be specified, and the parameters should be excluded.
- content_
types Sequence[str] - A list of custom Content-Type header values to apply the JSON parsing. The format of the Content-Type header values is defined in RFC 1341. When configuring a custom Content-Type header value, only the type/subtype needs to be specified, and the parameters should be excluded.
- content
Types List<String> - A list of custom Content-Type header values to apply the JSON parsing. The format of the Content-Type header values is defined in RFC 1341. When configuring a custom Content-Type header value, only the type/subtype needs to be specified, and the parameters should be excluded.
SecurityPolicyRecaptchaOptionsConfig, SecurityPolicyRecaptchaOptionsConfigArgs
- Redirect
Site stringKey - A field to supply a reCAPTCHA site key to be used for all the rules using the redirect action with the type of
GOOGLE_RECAPTCHA
under the security policy. The specified site key needs to be created from the reCAPTCHA API. The user is responsible for the validity of the specified site key. If not specified, a Google-managed site key is used.
- Redirect
Site stringKey - A field to supply a reCAPTCHA site key to be used for all the rules using the redirect action with the type of
GOOGLE_RECAPTCHA
under the security policy. The specified site key needs to be created from the reCAPTCHA API. The user is responsible for the validity of the specified site key. If not specified, a Google-managed site key is used.
- redirect
Site StringKey - A field to supply a reCAPTCHA site key to be used for all the rules using the redirect action with the type of
GOOGLE_RECAPTCHA
under the security policy. The specified site key needs to be created from the reCAPTCHA API. The user is responsible for the validity of the specified site key. If not specified, a Google-managed site key is used.
- redirect
Site stringKey - A field to supply a reCAPTCHA site key to be used for all the rules using the redirect action with the type of
GOOGLE_RECAPTCHA
under the security policy. The specified site key needs to be created from the reCAPTCHA API. The user is responsible for the validity of the specified site key. If not specified, a Google-managed site key is used.
- redirect_
site_ strkey - A field to supply a reCAPTCHA site key to be used for all the rules using the redirect action with the type of
GOOGLE_RECAPTCHA
under the security policy. The specified site key needs to be created from the reCAPTCHA API. The user is responsible for the validity of the specified site key. If not specified, a Google-managed site key is used.
- redirect
Site StringKey - A field to supply a reCAPTCHA site key to be used for all the rules using the redirect action with the type of
GOOGLE_RECAPTCHA
under the security policy. The specified site key needs to be created from the reCAPTCHA API. The user is responsible for the validity of the specified site key. If not specified, a Google-managed site key is used.
SecurityPolicyRule, SecurityPolicyRuleArgs
- Action string
- Action to take when
match
matches the request. Valid values: - Match
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. - Priority int
- An unique positive integer indicating the priority of evaluation for a rule. Rules are evaluated from highest priority (lowest numerically) to lowest priority (highest numerically) in order.
- Description string
- An optional description of this rule. Max size is 64.
- Header
Action SecurityPolicy Rule Header Action - Additional actions that are performed on headers. 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
- When set to true, the
action
specified above is not enforced. Stackdriver logs for requests that trigger a preview action are annotated as such. - Rate
Limit SecurityOptions Policy Rule Rate Limit Options - Must be specified if the
action
israte_based_ban
orthrottle
. Cannot be specified for other actions. Structure is documented below. - Redirect
Options SecurityPolicy Rule Redirect Options - Can be specified if the
action
isredirect
. Cannot be specified for other actions. Structure is documented below.
- Action string
- Action to take when
match
matches the request. Valid values: - 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. - Priority int
- An unique positive integer indicating the priority of evaluation for a rule. Rules are evaluated from highest priority (lowest numerically) to lowest priority (highest numerically) in order.
- Description string
- An optional description of this rule. Max size is 64.
- Header
Action SecurityPolicy Rule Header Action - Additional actions that are performed on headers. 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
- When set to true, the
action
specified above is not enforced. Stackdriver logs for requests that trigger a preview action are annotated as such. - Rate
Limit SecurityOptions Policy Rule Rate Limit Options - Must be specified if the
action
israte_based_ban
orthrottle
. Cannot be specified for other actions. Structure is documented below. - Redirect
Options SecurityPolicy Rule Redirect Options - Can be specified if the
action
isredirect
. Cannot be specified for other actions. Structure is documented below.
- action String
- Action to take when
match
matches the request. Valid values: - 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. - priority Integer
- An unique positive integer indicating the priority of evaluation for a rule. Rules are evaluated from highest priority (lowest numerically) to lowest priority (highest numerically) in order.
- description String
- An optional description of this rule. Max size is 64.
- header
Action SecurityPolicy Rule Header Action - Additional actions that are performed on headers. 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
- When set to true, the
action
specified above is not enforced. Stackdriver logs for requests that trigger a preview action are annotated as such. - rate
Limit SecurityOptions Policy Rule Rate Limit Options - Must be specified if the
action
israte_based_ban
orthrottle
. Cannot be specified for other actions. Structure is documented below. - redirect
Options SecurityPolicy Rule Redirect Options - Can be specified if the
action
isredirect
. Cannot be specified for other actions. Structure is documented below.
- action string
- Action to take when
match
matches the request. Valid values: - 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. - priority number
- An unique positive integer indicating the priority of evaluation for a rule. Rules are evaluated from highest priority (lowest numerically) to lowest priority (highest numerically) in order.
- description string
- An optional description of this rule. Max size is 64.
- header
Action SecurityPolicy Rule Header Action - Additional actions that are performed on headers. 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
- When set to true, the
action
specified above is not enforced. Stackdriver logs for requests that trigger a preview action are annotated as such. - rate
Limit SecurityOptions Policy Rule Rate Limit Options - Must be specified if the
action
israte_based_ban
orthrottle
. Cannot be specified for other actions. Structure is documented below. - redirect
Options SecurityPolicy Rule Redirect Options - Can be specified if the
action
isredirect
. Cannot be specified for other actions. Structure is documented below.
- action str
- Action to take when
match
matches the request. Valid values: - 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. - priority int
- An unique positive integer indicating the priority of evaluation for a rule. Rules are evaluated from highest priority (lowest numerically) to lowest priority (highest numerically) in order.
- description str
- An optional description of this rule. Max size is 64.
- header_
action SecurityPolicy Rule Header Action - Additional actions that are performed on headers. 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
- When set to true, the
action
specified above is not enforced. Stackdriver logs for requests that trigger a preview action are annotated as such. - rate_
limit_ Securityoptions Policy Rule Rate Limit Options - Must be specified if the
action
israte_based_ban
orthrottle
. Cannot be specified for other actions. Structure is documented below. - redirect_
options SecurityPolicy Rule Redirect Options - Can be specified if the
action
isredirect
. Cannot be specified for other actions. Structure is documented below.
- action String
- Action to take when
match
matches the request. Valid values: - match Property Map
- A match condition that incoming traffic is evaluated against.
If it evaluates to true, the corresponding
action
is enforced. Structure is documented below. - priority Number
- An unique positive integer indicating the priority of evaluation for a rule. Rules are evaluated from highest priority (lowest numerically) to lowest priority (highest numerically) in order.
- description String
- An optional description of this rule. Max size is 64.
- header
Action Property Map - Additional actions that are performed on headers. 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
- When set to true, the
action
specified above is not enforced. Stackdriver logs for requests that trigger a preview action are annotated as such. - rate
Limit Property MapOptions - Must be specified if the
action
israte_based_ban
orthrottle
. Cannot be specified for other actions. Structure is documented below. - redirect
Options Property Map - Can be specified if the
action
isredirect
. Cannot be specified for other actions. Structure is documented below.
SecurityPolicyRuleHeaderAction, SecurityPolicyRuleHeaderActionArgs
- Request
Headers List<SecurityTo Adds Policy Rule Header Action Request Headers To Add> - The list of request headers to add or overwrite if they're already present. Structure is documented below.
- Request
Headers []SecurityTo Adds Policy Rule Header Action Request Headers To Add - The list of request headers to add or overwrite if they're already present. Structure is documented below.
- request
Headers List<SecurityTo Adds Policy Rule Header Action Request Headers To Add> - The list of request headers to add or overwrite if they're already present. Structure is documented below.
- request
Headers SecurityTo Adds Policy Rule Header Action Request Headers To Add[] - The list of request headers to add or overwrite if they're already present. Structure is documented below.
- request_
headers_ Sequence[Securityto_ adds Policy Rule Header Action Request Headers To Add] - The list of request headers to add or overwrite if they're already present. Structure is documented below.
- request
Headers List<Property Map>To Adds - The list of request headers to add or overwrite if they're already present. Structure is documented below.
SecurityPolicyRuleHeaderActionRequestHeadersToAdd, SecurityPolicyRuleHeaderActionRequestHeadersToAddArgs
- Header
Name string - The name of the header to set.
- Header
Value string - The value to set the named header to.
- Header
Name string - The name of the header to set.
- Header
Value string - The value to set the named header to.
- header
Name String - The name of the header to set.
- header
Value String - The value to set the named header to.
- header
Name string - The name of the header to set.
- header
Value string - The value to set the named header to.
- header_
name str - The name of the header to set.
- header_
value str - The value to set the named header to.
- header
Name String - The name of the header to set.
- header
Value String - The value to set the named header to.
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.
SecurityPolicyRuleRedirectOptions, SecurityPolicyRuleRedirectOptionsArgs
Import
Security policies can be imported using any of these accepted formats:
projects/{{project}}/global/securityPolicies/{{name}}
{{project}}/{{name}}
{{name}}
When using the pulumi import
command, security policies can be imported using one of the formats above. For example:
$ pulumi import gcp:compute/securityPolicy:SecurityPolicy default projects/{{project}}/global/securityPolicies/{{name}}
$ pulumi import gcp:compute/securityPolicy:SecurityPolicy default {{project}}/{{name}}
$ pulumi import gcp:compute/securityPolicy:SecurityPolicy default {{name}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-beta
Terraform Provider.